﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using log4net.Config;

namespace TeachMe.Application.Forms.Options
{
    public partial class Files : OptionsControl
    {
        public Files()
        {
            InitializeComponent();
        }

        internal override void LoadOptions()
        {
            tbImportSettings.Text = Root.Paths.ImportExcludes;
            tbLogFile.Text = Root.Paths.LogFile;
            tbMachineSettings.Text = Root.Paths.MachineSettings;
            tbPrioritiesFolder.Text = Root.Paths.Priorities;
            tbTeachMe.Text = Root.Paths.Executable;
            tbUserSettings.Text = Root.Paths.UserSettings;
        }

        internal override void SaveOptions()
        {
            //
        }

        private void OnFindTeachMeClick(object sender, EventArgs e)
        {
            Utilities.FindFile(Root.Paths.Executable);
        }

        private void OnOpenLogClick(object sender, EventArgs e)
        {
            Utilities.OpenFile(Root.Paths.LogFile);
        }
            
        private void OnFindUserSettingsClick(object sender, EventArgs e)
        {
            Utilities.FindFile(Root.Paths.UserSettings);
        }

        private void OnFindMachineSettingsClick(object sender, EventArgs e)
        {
            Utilities.FindFile(Root.Paths.MachineSettings);
        }

        private void OnFindImportSettingsClick(object sender, EventArgs e)
        {
            Utilities.FindFile(Root.Paths.ImportExcludes);
        }

        private void OnFindPrioritiesFolderClick(object sender, EventArgs e)
        {
            Utilities.FindFile(Root.Paths.Priorities);
        }
    }
}
